package com.atcc.test.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.atcc.test.domain.BasicInterception;

@Configuration
public class InterceptionConfig implements WebMvcConfigurer{
	
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(interceptor())
				.addPathPatterns("/*")
				.excludePathPatterns("/*");
	}
	
	@Bean
	public HandlerInterceptor interceptor() {
		return new BasicInterception();
	}

	
}
